#ifndef _CINDICATOR_RSI_H
#define _CINDICATOR_RSI_H
namespace GSTrader
{
	namespace Indicator
	{
		class INDICATOR_API RSI : public CIndicator
		{
		public:
			RSI();
			virtual ~RSI();
			virtual CIndicator* CreateInstance();

			virtual void SetParam(double* pdParam);
			virtual void SetInputSeries(CSeries* pSeries);
			virtual double Calculate(int nIndex);
			virtual void RefreshData();

		private:
			int m_n1;
			int m_n2;
			int m_n3;

			CDataSeries* m_pRefSeries;
			CDataSeries* m_pMaxSeries;
			CDataSeries* m_pAbsSeries;

			SMA* m_pMaxSma1;
			SMA* m_pMaxSma2;
			SMA* m_pMaxSma3;
			SMA* m_pAbsSma1;
			SMA* m_pAbsSma2;
			SMA* m_pAbsSma3;

			CIndicatorResult* m_pRsi1;
			CIndicatorResult* m_pRsi2;
			CIndicatorResult* m_pRsi3;
			
		};
	}
}

#endif // _CINDICATOR_RSI_H

